#include <stdio.h>
#include <time.h>
#include <unistd.h>

int main(int argc, char const *argv[])
{
    time_t T_1;
    time_t T_2;

    T_1 = time(NULL);
    sleep(1);  // 延时 1 s
    T_2 = time(NULL);
    double t_dou = 0;
    t_dou = difftime( T_2 , T_1);
    printf("%lf\n" , t_dou);

    
    return 0;
}


